激活函数是元素的数学函数,在深神经网络(DNN)中起着至关重要的作用。已经提出了许多新颖和复杂的激活功能来提高DNN的准确性,但在训练过程中还可以通过反向传播消耗大量记忆。在这项研究中,我们提出了嵌套的正向自动分化(正向AD),专门针对用于记忆效率的DNN训练的元素激活函数。我们在两个广泛使用的深度学习框架(Tensorflow和Pytorch)中部署了嵌套的AD,分别支持静态和动态计算图。我们的评估表明,在相同的记忆降低率下,嵌套的前AD嵌套将记忆足迹降低到1.97倍,比基线模型降低了20%。
translated by 谷歌翻译
量化是一种降低DNN模型的计算和记忆成本的技术,DNN模型越来越大。现有的量化解决方案使用固定点整数或浮点类类型,这些量子的好处有限,因为两者都需要更多位以保持原始型号的准确性。另一方面,可变长度量化使用低位量化对正常值和高精度的分数对异常值的一部分。即使这项工作带来了算法的好处,但由于长度的编码和解码,它也引入了重要的硬件开销。在这项工作中,我们提出了一种称为ANT的固定长度自适应数值数据类型,以通过微小的硬件开销实现低位量化。我们的数据类型ANT利用了两项关键创新来利用DNN模型中的张贴内和调整的自适应机会。首先,我们提出了一种特定的数据类型Flint,该数据类型结合了Float和INT的优势,以适应张量中不同值的重要性。其次,我们提出了一个自适应框架,该框架根据其分布特性选择每个张量的最佳类型。我们为蚂蚁设计了统一的处理元件体系结构,并显示其与现有DNN加速器的易于集成。我们的设计导致2.8 $ \ times $速度和2.5 $ \ times $ $ $ $ $ \ times $ $ \ times $ $ \ times $ $ \ times $ $ \ times $ $ \ times $ $ \ times $ $ \ times $比最先进的量化加速器提高了能源效率。
translated by 谷歌翻译
训练后量化(PTQ)由于其在部署量化的神经网络方面的便利性而引起了越来越多的关注。 Founding是量化误差的主要来源,仅针对模型权重进行了优化,而激活仍然使用圆形至最终操作。在这项工作中,我们首次证明了精心选择的激活圆形方案可以提高最终准确性。为了应对激活舍入方案动态性的挑战,我们通过简单的功能适应圆形边框,以在推理阶段生成圆形方案。边界函数涵盖了重量误差,激活错误和传播误差的影响,以消除元素误差的偏差,从而进一步受益于模型的准确性。我们还使边境意识到全局错误,以更好地拟合不同的到达激活。最后,我们建议使用Aquant框架来学习边界功能。广泛的实验表明,与最先进的作品相比,Aquant可以通过可忽略不计的开销来取得明显的改进,并将Resnet-18的精度提高到2位重量和激活后训练后量化下的精度最高60.3 \%。
translated by 谷歌翻译
变压器的注意机制有效地从输入序列中提取相关信息。然而,自我注意力的二次复杂性W.R.T序列长度会产生沉重的计算和记忆负担,尤其是对于长序列的任务。现有的加速器在这些任务中面临性能退化。为此,我们建议Salo为长序列提供杂交稀疏注意机制。Salo包含一个数据调度程序,将混合稀疏注意模式映射到硬件和空间加速器上,以执行有效的注意力计算。我们表明,与GPU和CPU实施相比,Salo平均达到17.66 X和89.33倍的速度,即典型的工作负载,即Longformer和VIL。
translated by 谷歌翻译
变压器模型已经取得了有希望的自然语言处理(NLP)任务,包括提取问题应答(QA)。 NLP任务中使用的通用变压器编码器在所有层中处理上下文段落中所有输入令牌的隐藏状态。但是,与序列分类等其他任务不同,应答所提出的问题不一定需要上下文段落中的所有令牌。在此动机之后,我们提出了薄块撇子,这将在更高的隐藏层中略微浏览不必要的上下文,以改善和加速变压器性能。块撇屏的关键概念是识别必须进一步处理的上下文,并且可以在推理期间早期安全地丢弃的语言。批判性地,我们发现这些信息可以充分地从变压器模型内的自我注意重量得出。我们进一步将对应于下层的不必要位置对应的隐藏状态,实现了显着的推理时间加速。令我们惊讶的是,我们观察到这种方式修剪的模型优于他们的全尺寸对应物。 Block-Skim在不同数据集上提高了QA模型的准确性,并在BERT-Base模型上实现了3次加速。
translated by 谷歌翻译
图形神经网络(GNN)代表了在图形结构上运行的深度学习模型的新兴线路。由于其在许多与图形相关任务中实现的高精度,它变得越来越受欢迎。然而,在系统和建筑社区中,GNN在系统和建筑社区中不太了解,作为其对应物,例如多层的感知和卷积神经网络。这项工作试图向我们的社区介绍GNN。与仅呈现GCNS的特征的事先工作相比,我们的工作基于一般GNN描述框架覆盖GNN工作负载的大部分品种。通过构建两个广泛使用的库之上的模型,我们在有关通用和特定于应用程序的架构的推理阶段的特征在于GNN计算,希望我们的工作能够促进更多的系统和建筑研究GNN。
translated by 谷歌翻译
Denoising Diffusion Probabilistic Models (DDPMs) are emerging in text-to-speech (TTS) synthesis because of their strong capability of generating high-fidelity samples. However, their iterative refinement process in high-dimensional data space results in slow inference speed, which restricts their application in real-time systems. Previous works have explored speeding up by minimizing the number of inference steps but at the cost of sample quality. In this work, to improve the inference speed for DDPM-based TTS model while achieving high sample quality, we propose ResGrad, a lightweight diffusion model which learns to refine the output spectrogram of an existing TTS model (e.g., FastSpeech 2) by predicting the residual between the model output and the corresponding ground-truth speech. ResGrad has several advantages: 1) Compare with other acceleration methods for DDPM which need to synthesize speech from scratch, ResGrad reduces the complexity of task by changing the generation target from ground-truth mel-spectrogram to the residual, resulting into a more lightweight model and thus a smaller real-time factor. 2) ResGrad is employed in the inference process of the existing TTS model in a plug-and-play way, without re-training this model. We verify ResGrad on the single-speaker dataset LJSpeech and two more challenging datasets with multiple speakers (LibriTTS) and high sampling rate (VCTK). Experimental results show that in comparison with other speed-up methods of DDPMs: 1) ResGrad achieves better sample quality with the same inference speed measured by real-time factor; 2) with similar speech quality, ResGrad synthesizes speech faster than baseline methods by more than 10 times. Audio samples are available at https://resgrad1.github.io/.
translated by 谷歌翻译
In this work, we investigate improving the generalizability of GAN-generated image detectors by performing data augmentation in the fingerprint domain. Specifically, we first separate the fingerprints and contents of the GAN-generated images using an autoencoder based GAN fingerprint extractor, followed by random perturbations of the fingerprints. Then the original fingerprints are substituted with the perturbed fingerprints and added to the original contents, to produce images that are visually invariant but with distinct fingerprints. The perturbed images can successfully imitate images generated by different GANs to improve the generalization of the detectors, which is demonstrated by the spectra visualization. To our knowledge, we are the first to conduct data augmentation in the fingerprint domain. Our work explores a novel prospect that is distinct from previous works on spatial and frequency domain augmentation. Extensive cross-GAN experiments demonstrate the effectiveness of our method compared to the state-of-the-art methods in detecting fake images generated by unknown GANs.
translated by 谷歌翻译
Surgery is the only viable treatment for cataract patients with visual acuity (VA) impairment. Clinically, to assess the necessity of cataract surgery, accurately predicting postoperative VA before surgery by analyzing multi-view optical coherence tomography (OCT) images is crucially needed. Unfortunately, due to complicated fundus conditions, determining postoperative VA remains difficult for medical experts. Deep learning methods for this problem were developed in recent years. Although effective, these methods still face several issues, such as not efficiently exploring potential relations between multi-view OCT images, neglecting the key role of clinical prior knowledge (e.g., preoperative VA value), and using only regression-based metrics which are lacking reference. In this paper, we propose a novel Cross-token Transformer Network (CTT-Net) for postoperative VA prediction by analyzing both the multi-view OCT images and preoperative VA. To effectively fuse multi-view features of OCT images, we develop cross-token attention that could restrict redundant/unnecessary attention flow. Further, we utilize the preoperative VA value to provide more information for postoperative VA prediction and facilitate fusion between views. Moreover, we design an auxiliary classification loss to improve model performance and assess VA recovery more sufficiently, avoiding the limitation by only using the regression metrics. To evaluate CTT-Net, we build a multi-view OCT image dataset collected from our collaborative hospital. A set of extensive experiments validate the effectiveness of our model compared to existing methods in various metrics. Code is available at: https://github.com/wjh892521292/Cataract OCT.
translated by 谷歌翻译
Knowledge distillation is often used to transfer knowledge from a strong teacher model to a relatively weak student model. Traditional knowledge distillation methods include response-based methods and feature-based methods. Response-based methods are used the most widely but suffer from lower upper limit of model performance, while feature-based methods have constraints on the vocabularies and tokenizers. In this paper, we propose a tokenizer-free method liberal feature-based distillation (LEAD). LEAD aligns the distribution between teacher model and student model, which is effective, extendable, portable and has no requirements on vocabularies, tokenizer, or model architecture. Extensive experiments show the effectiveness of LEAD on several widely-used benchmarks, including MS MARCO Passage, TREC Passage 19, TREC Passage 20, MS MARCO Document, TREC Document 19 and TREC Document 20.
translated by 谷歌翻译